<div class="bg-light lter b-b wrapper-sm">
	<h1 class="m-n font-thin h4">询价单应收报价</h1>
</div>
<div class="wrapper-sm" ng-controller="inquiryRatifyCtrl">
	<div class="panel panel-default">
		<div class="panel-body">
			<form name="step1" class="form-validation form-horizontal">
				<div class="form-group">
					<div class="panel-heading font-bold m-t-n m-b-sm">
						基本信息
					</div>
					<label class="col-lg-1 pull-left control-label">总询价单编号:</label>
					<label class="col-lg-2 control-label text-left" ng-model="inquiryId"></label>
					<label class="w-s pull-left control-label">紧急程度<span class="text-danger">*</span></label>
					<div class="col-lg-1">
						<input id="inquiryRatify_urgency" type="text" class="form-control input-sm" ng-model="urgency" placeholder="请填写紧急程度" required name="urgency">
					</div>
					<div class="pull-left m-l-n-sm">
						<select id="inquiryRatify_urgencyUnit" class="form-control input-sm" ng-model="urgencyUnit" name="urgencyUnit" ng-options="x.value as x.text for x in urgencyUnitList">
                            <option value="">请选择</option>
                        </select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-1 pull-left control-label">计划专员  :</label>
					<label class="col-lg-2 control-label text-left" ng-model="plannerName">彭海运</label>
					<label class="w-s pull-left control-label">商务专员<span class="text-danger">*</span></label>
					<div class="pull-left">
						<select id="inquiryRatify_business" class="form-control input-sm" ng-model="businessOfficerId" name="businessOfficerId" ng-options="x.id as x.realName for x in businessOfficerList">
                            <option value="">请选择</option>
                        </select>
					</div>
					<label class="w-s pull-left control-label">客服专员<span class="text-danger">*</span></label>
					<div class="pull-left">
						<select id="inquiryRatify_customer" class="form-control input-sm" ng-model="customerServiceOfficerId" name="customerServiceOfficerId" ng-options="x.id as x.realName for x in customerServiceOfficerList">
                            <option value="">请选择</option>
                        </select>
					</div>
					<label class="w-s pull-left control-label">调度专员<span class="text-danger">*</span></label>
					<div class="pull-left">
						<select id="inquiryRatify_dispatchOfficerId" class="form-control input-sm" ng-model="dispatchOfficerId" name="dispatchOfficerId" ng-options="x.id as x.realName for x in dispatchOfficerList">
                            <option value="">请选择</option>
                        </select>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-1 pull-left control-label">客户单位<span class="text-danger">*</span></label>
					<div class="col-lg-2">
						<div angucomplete-alt id="client" placeholder="" pause="100" selected-object="clientSelect" local-data="clientData" search-fields="name"
							title-field="name" minlength="1" input-class="form-control form-control-small input-sm" initial-value="clientName"
							match-class="highlight" required>
						</div>
					</div>
					<label class="w-s pull-left control-label">发货计划人<span class="text-danger">*</span></label>
					<div class="col-lg-2">
						<div angucomplete-alt id="consignor" placeholder="" pause="100" selected-object="consignorSelect" local-data="consignorList"
							search-fields="realName" title-field="realName" minlength="1" input-class="form-control form-control-small input-sm"
							initial-value="consignorName" match-class="highlight" required>
						</div>
					</div>
					<label class="w-s pull-left control-label">发货人电话<span class="text-danger">*</span></label>
					<div class="col-lg-2">
						<input id="inquiryRatify_consignorPhone" type="text" class="form-control input-sm" ng-model="consignorPhone" placeholder="请填写发货人电话" required name="consignorPhone"
							disabled="disabled">
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-1 pull-left control-label">总询价内容  :</label>
					<div class="col-lg-10 pull-left control-label">
						<textarea class="form-control input-sm" ng-model="content" placeholder="请填写总询价内容" name="content"></textarea>
					</div>
				</div>
				<div class="form-group">
					<div class="panel-heading font-bold m-b-sm">
						线路信息
					</div>
					<label class="col-lg-1 pull-left control-label">发货地址<span class="text-danger">*</span></label>
					<div class="col-lg-4">
						<ng-area city-list="startCityList" area-list="startAreaList" province="startProvince" city="startCity" area="startArea"></ng-area>
					</div>
					<div class="col-lg-3 m-l-n-lg">
						<input id="inquiryRatify_startAddress"  type="text" class="form-control input-sm" id="startCity" ng-model="startAddress" placeholder="请填写详细地址" required name="startAddress">
					</div>
					<div class="line  pull-in"></div>
					<label class="col-lg-1 pull-left control-label">送货地址<span class="text-danger">*</span></label>
					<div class="col-lg-4">
						<ng-area city-list="endCityList" area-list="endAreaList" province="endProvince" city="endCity" area="endArea"></ng-area>
					</div>
					<div class="col-lg-3 m-l-n-lg">
						<input id="inquiryRatify_endAddress" type="text" class="form-control input-sm" ng-model="endAddress" placeholder="请填写详细地址" required name="endAddress">
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-1 pull-left control-label">预计发货时间<span class="text-danger">*</span></label>
					<div class="col-lg-3">
						<div class="input-group input-group-sm date">
							<input id="inquiryRatify_arrivalTime" datetimepicker plugintype="datetime" ng-model="plannedArrivalTime" name="plannedArrivalTime" placeholder="预计发货时间" class="form-control" type="text"
							/>
							<span class="input-group-addon">
                                <span class="glyphicon glyphicon-calendar"></span>
							</span>
						</div>
					</div>
					<label class="w-s pull-left control-label">预计到货时间<span class="text-danger">*</span></label>
					<div class="col-lg-3">
						<div class="input-group input-group-sm date">
							<input id="inquiryRatify_deliveryTime" datetimepicker plugintype="datetime" ng-model="plannedDeliveryTime" name="plannedDeliveryTime" placeholder="预计到货时间" class="form-control" type="text"
							/>
							<span class="input-group-addon">
                                <span class="glyphicon glyphicon-calendar"></span>
							</span>
						</div>
					</div>
					<label class="w-s pull-left control-label">里程数</label>
					<div class="col-lg-2">
						<input id="inquiryRatify_mileage" type="text" class="form-control input-sm" ng-model="mileage" placeholder="请填写里程数" required name="mileage">
					</div>
					<label class="w-s pull-left control-label">公里</label>
				</div>
				<div class="form-group">
					<div class="panel-heading font-bold m-b-sm">
						货物信息
					</div>
					<label class="col-lg-1 pull-left control-label">货物类别<span class="text-danger">*</span></label>
					<div class="col-lg-2">
						<select id="goodsTypeName" class="form-control input-sm" name="goodsTypeId" ng-model="goodsTypeId" ng-change="changeGoods()" ng-options="x.id as x.name for x in goodsTypeList">
                            <option value="">请选择</option>
                        </select>
					</div>
					<label class="w-s pull-left control-label">货物名称<span class="text-danger">*</span></label>
					<div class="col-lg-2">
						<select class="form-control input-sm" id="goodsName" ng-model="goodsId" name="goodsId" ng-options="x.id as x.name for x in goodList">
                            <option value="">请选择</option>
                        </select>
					</div>
					<label class="w-s pull-left control-label">货物数量<span class="text-danger">*</span></label>
					<div class="col-lg-2">
						<input id="inquiryRatify_goodsQuantity" type="text" ng-pattern="/^[0-9]+(.[0-9]{1,4})?$/" class="form-control input-sm" ng-model="goodsQuantity" placeholder="请填写货物数量"
							required name="goodsQuantity">
					</div>
					<div class="col-lg-2 m-l-n-sm">
						<select class="form-control input-sm" id="goodsQuantityUnit" ng-model="goodsQuantityUnit" name="goodsQuantityUnit" ng-options="x.value as x.text for x in goodsQuantityUnitList">
                            <option value="">请选择</option>
                        </select>
					</div>
				</div>
				<div class="form-group">
					<div class="panel-heading font-bold m-b-sm">
						所需车辆信息
					</div>
					<label class="col-lg-1 pull-left control-label">所需车辆<span class="text-danger">*</span></label>
					<div class="col-lg-2">
						<select id="carType" class="form-control input-sm" ng-model="carType" name="carType" ng-options="x.value as x.text for x in carTypeList">
                            <option value="">请选择</option>
                        </select>
					</div>
					<label class="w-s pull-left control-label">所需车长<span class="text-danger">*</span></label>
					<div class="col-lg-2">
						<select id="carLength" class="form-control input-sm" ng-model="carLength" name="carLength" ng-options="x.value as x.text for x in carLengthList">
                            <option value="">请选择</option>
                        </select>
					</div>
					<label class="w-s pull-left control-label">承运方式<span class="text-danger">*</span></label>
					<div class="col-lg-2">
						<select id="carrierCategory" class="form-control input-sm" ng-model="carrierCategory" name="carrierCategory" ng-options="x.value as x.text for x in carrierCategoryList">
                            <option value="">请选择</option>
                        </select>
					</div>
					<label class="w-s pull-left control-label">装车效果</label>
					<div class="col-lg-2">
						<input id="inquiryRatify_loadingEffect" type="text" class="form-control input-sm" ng-model="loadingEffect" placeholder="请填写装车效果" required name="loadingEffect">
					</div>
				</div>
				<div class="form-group">
					<div class="panel-heading font-bold m-b-sm">
						附件信息
					</div>
					<div class="col-md-4 m-l-xs">
						<label class="pull-left m-l m-r">附件上传</label>
						<div class="col-md-3 form-group">
							<input id="inquiryRatify_driveruploader" type="file" style="width:72px;" nv-file-select="" uploader="Driveruploader" name="Driveruploader" ng-disabled="Driveruploader.queue.length"
							/>
						</div>
					</div>
					<div class="wrapper-sm">
						<div class="line  pull-in"></div>
						<div class="wrapper-sm bg-light dk b-b m-b-xs hidden">
							<span class="">上传文件数: <b class="badge bg-info">{{ Driveruploader.queue.length }}</b></span>
						</div>
						<table class="table bg-white-only b-a">
							<thead>
								<tr>
									<th width="50%">名称</th>
									<th>大小</th>
									<th>进度</th>
									<th>状态</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<tr ng-repeat="item in Driveruploader.queue">
									<td>
										<strong>{{ item.file.name }}</strong>
										<div ng-thumb="{ file: item._file, height: 100 }"></div>
									</td>
									<td nowrap>{{ item.fileSize/1024/1024|number:2 }} MB</td>
									<td>
										<div class="progress" style="margin-bottom: 0;">
											<div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
										</div>
									</td>
									<td class="text-center">
										<span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
										<span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
										<span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>
									</td>
									<td nowrap>
										<button id="inquiryRatify_upload" type="button" class="btn btn-success btn-xs" ng-click="item.upload()" ng-disabled="item.isReady || item.isUploading || item.isSuccess">
                                            <span class="glyphicon glyphicon-upload"></span> 上传
                                        </button>
										<button id="inquiryRatify_cancel" type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" ng-disabled="!item.isUploading">
                                            <span class="glyphicon glyphicon-ban-circle"></span> 取消
                                        </button>
										<button id="inquiryRatify_delete" type="button" class="btn btn-danger btn-xs" ng-click="[item.remove(),Driveruploader.Delete(item)]">
                                            <span class="glyphicon glyphicon-trash"></span> 删除
                                        </button>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="form-group">
					<label class="m-l-xxl pull-left control-label">备注</label>
					<div class="col-lg-10">
						<textarea class="form-control input-sm" ng-model="attachmentDetails" placeholder="请填写备注" name="attachmentDetails"></textarea>
					</div>
				</div>
				<div class="form-group" ng-show="inquiryChildShow">
					<div class="panel-heading font-bold m-b-sm">
						子询价单列表
					</div>
					<div class="form-group m-b-n">
						<div class="pull-right m-r-xl">
							<button id="inquiryRatify_addChildList" class="btn m-b-xs btn-sm btn-info btn-addon" ng-click="inquiryChildListAdd()"><i class="fa fa-plus"></i>新增</button>
						</div>
					</div>
					<div class="wrapper-sm">
						<div class="table-responsive">
							<div ui-grid="inquiryList" ui-grid-pagination style="height:{{height}}px; overflow-x:hidden;">
								<div class="watermark" ng-if="!inquiryList.data.length">暂无数据</div>
							</div>
						</div>
					</div>
				</div>
				<div class="form-group" ng-show="remrksShow">
					<div class="panel-heading font-bold m-b-sm">
						备注信息
					</div>
					<label class="col-lg-1 pull-left control-label">备注</label>
					<div class="col-lg-10">
						<textarea class="form-control input-sm" ng-model="remarks" placeholder="请填写备注" name="remarks"></textarea>
					</div>
				</div>
				<div class="form-group">
					<label class="col-lg-1 pull-left control-label"></label>
					<div class="col-lg-5">
						<button id="inquiryRatify_save" class="pull-right-xs btn m-b-xs btn-sm btn-primary btn-addon" ng-click="InquirySave()"><i class="fa fa-check"></i>询价发布</button>
						<button id="inquiryRatify_back" ui-sref="app.inquiry.Inquiry_add" class="pull-right-xs btn m-b-xs btn-sm btn-info btn-addon "><i class="fa fa-reply"></i>返回</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>